textlayout: fix bounds for clipping
authorChristian Hergert <chergert@redhat.com>
Mon, 22 Jul 2019 01:21:04 +0000 (18:21 -0700)
committerChristian Hergert <chergert@redhat.com>
Mon, 22 Jul 2019 01:21:04 +0000 (18:21 -0700)
This should match gtk_snapshot_append_layout(), which means that we expect the
bounds to be rooted at 0, 0.

gtk/gtktextlayout.c

index acf003912e11f9d2ad05f53e8bd63b13b056227e..6974353b7c2f89429488d60aa84f853e6dcf32f6 100644 (file)
@@ -4036,11 +4036,7 @@ gtk_text_layout_snapshot (GtkTextLayout      *layout,
   crenderer->snapshot = snapshot;
   crenderer->fg_color = color;
 
-  graphene_rect_init (&crenderer->bounds,
-                      clip->x,
-                      clip->y,
-                      clip->width,
-                      clip->height);
+  graphene_rect_init (&crenderer->bounds, 0, 0, clip->width, clip->height);
 
   gtk_text_layout_wrap_loop_start (layout);